import hForm from './hForm/index.vue'
import hFormItem from './hFormItem/index.vue'
import hInput from './hInput/index.vue'
import hPicker from './hPicker/index.vue'
import hToast from './hToast/index.vue'
import hTab from './hTab/index.vue'
import hTabPane from './hTabPane/index.vue'
import hSwiper from './hSwiper/index.vue'
import hModal from './hModal/index.vue'
import hUpload from './hUpload/index.vue'
import hEmpty from './hEmpty/index.vue'
import hSkeleton from './hSkeleton/index.vue'
import hDialog from './hDialog/index.vue'
import hScrollList from './hScrollList/index.vue'
import hButton from './hButton/index.vue'

const allComponents = {
  hForm,
  hFormItem,
  hInput,
  hPicker,
  hToast,
  hTab,
  hTabPane,
  hSwiper,
  hModal,
  hUpload,
  hEmpty,
  hSkeleton,
  hDialog,
  hScrollList,
  hButton
}

let hToastInstanse = null

const install = (app) => {
  for (const key in allComponents) {
    const component = allComponents[key];
    app.component(key, component);
  }
};

export {
  hForm,
  hFormItem,
  hInput,
  hPicker,
  hToast,
  hTab,
  hTabPane,
  hSwiper,
  hModal,
  hUpload,
  hEmpty,
  hSkeleton,
  hDialog,
  hScrollList,
  hButton
}

export default install
